<template>
	<view class="my-search-container" @click="searchBoxHandler" :style="{'background-color':bgColor}" >
		<view class="my-search-box" :style="{'border-radius':radius + 'rpx'}">
		  <uni-icons type="search" size="17"></uni-icons>
      <text class="palceholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
    props:{
      // 背景颜色
      bgColor:{
        type:String,
        default:'#c00000'
      },
      // 圆角尺寸
      radius:{
        type: Number,
        default:36 // rpx
      }
    },
    methods:{
      searchBoxHandler(){
        this.$emit('click')
      }
    }
	}
</script>

<style lang="scss">
.my-search-container{
  height: 100rpx;
  // background-color: #c00000;
  display: flex;
  align-items: center;
  padding: 0rpx 20rpx;
  .my-search-box {
    height: 72rpx;
    background-color: #ffffff;
    // border-radius: 36rpx;
    width: 100%;
    display: flex;
    line-height: 72rpx;
    justify-content: center;
    .palceholder {
      font-size: 30rpx;
      margin-left: 10rpx;
    }
  }
}
</style>
